<?php
session_start();
if($_SERVER['REQUEST_METHOD'] != "POST") {
//if(!isset($_POST['submit'])){
    exit('非法访问!');
}

if(is_null($_SESSION['username'])||$_SESSION['username']==""){
exit('非法访问!');
}
$takeaway_price = $_POST['takeaway_price'];
$address = $_POST['address'];
$open_time1 = $_POST['open_time1'];
$open_time2 = $_POST['open_time2'];
$open_time=$open_time1."-".$open_time2;
$takeaway_tel = $_POST['takeaway_tel'];
$contact = $_POST['contact'];
$userid=$_SESSION['supplierid'];

//包含数据库连接文件
include('system/db/conn.php');
//检测用户名是否已经存在
$sql = "update do_supplier_location set takeaway_price='$takeaway_price',address='$address',open_time='$open_time',takeaway_tel='$takeaway_tel',contact='$contact' where supplier_id=$userid ";
if(mysql_query($sql,$conn)){
	//echo "修改商铺信息成功";
	//echo "<br/>";
	//echo '点击此处 <a href="shop-xx.php">查看</a> 重试';
	header('location:shop-xx.php');
    exit;
} else {
    echo '抱歉！修改商铺信息失败：',mysql_error(),'<br />';
    echo '点击此处 <a href="javascript:history.back(-1);">返回</a> 重试';
    exit;
}
?>